package com.heima.array;

public class TestObjectArray {
    public static void main(String[] args) {
        Student[] stuArr = new Student[4];

        stuArr[0] = new Student("甲",23);
        stuArr[1] = new Student("乙",13);
        stuArr[2] = new Student("丙",8);

        for (int i = 0; i < stuArr.length; i++) {
            System.out.println(stuArr[i].getName()+stuArr[i].getAge()+"岁");
        }

    }
}
